﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AdminUI.Controllers
{
    public class UserManageController : BaseController
    {
        // GET: UserManage
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult UserFrom(int id)
        {
            var data = Common.HttpHelper.HttpGet<Common.Result<Common.Param_User>>(Common.Tools.ApiPath + "api/User/Find/" + id, "get").Data;            
            var userclouddata = Common.HttpHelper.HttpGet<Common.Result<List<Common.Param_UserCloudDataByUserID>>>(Common.Tools.ApiPath + "Api/UserCloudData/FindByUserID/" + id, "get").Data;
            ViewBag.UCD = userclouddata;
            TimeSpan t = DateTime.Now - data.CreateTime.Value;
            ViewBag.Time = t.ToString().Split('.')[0]+"天";            
            return PartialView(data);
        }
        public ActionResult UserAdd()
        {
            return View();
        }
    }
}